/*
 * Copyright (c) 2006-2018, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author            Notes
 * 2018-11-06     balanceTWK        first version
 */
#ifndef __DRV_GPIO_H__
#define __DRV_GPIO_H__
#include "main.h"	
#include "os_types.h"
#include <rtthread.h>

#define GD32_PORT(port)  (GPIO##port)

#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)GD32_PORT(PORTx) - (rt_base_t)GPIOA) / (0x0400UL) )) + PIN)

int32_t rt_hw_pin_init(void);

#endif /* __DRV_GPIO_H__ */

